package com.hainatong.shiphelper.api;

import android.text.TextUtils;

public class ApiResult<T>
{
    private boolean status;

    private String code;

    private String message;

    private T data;

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public boolean isStatus()
    {
        return status;
    }

    public void setStatus(boolean status)
    {
        this.status = status;
    }

    public String getCode()
    {
        return code;
    }

    public void setCode(String code)
    {
        this.code = code;
    }

    public T getData()
    {
        return data;
    }

    public void setData(T data)
    {
        this.data = data;
    }

    public boolean isOk()
    {
        if(!TextUtils.isEmpty( code ) && code.equals("200") )
        {
            return  true;
        }
        else
        {
            return  false;
        }
    }

}
